package com.feng.eduorder.service;

import com.feng.commonutils.R;
import com.feng.eduorder.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author fengge
 * @since 2023-03-30
 */
public interface OrderService extends IService<Order> {
    /**
     * 根据课程id点立即购买保存订单信息
     * @param courseId
     * @param request
     * @return
     */
    R saveOrder(String courseId, HttpServletRequest request);

    /**
     * 根据订单id查询订单信息
     * @param orderId
     * @return
     */
    R getOrderInfo(String orderId);

    /**
     * 判断登录用户是否购买了该课程
     * @param courseId
     * @return
     */
    Boolean getCourseBuy(String courseId,String memberId);
}
